package com.gamesnet.ihm;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

import com.gamesnet.widget.ActionBar;
import com.gamesnet.widget.ActionBar.IntentAction;

public class NewPublicationActivity extends Activity implements View.OnClickListener{

	EditText textpubliez;
	Button publier ;
	private long userId;

	@Override
	public void onCreate(Bundle savedInstanceState) { 
		super.onCreate(savedInstanceState); 
		setContentView(R.layout.publiez);

		Bundle b = getIntent().getExtras();
		Log.v("compteactivity",getIntent().toString());
		userId = b.getLong("sender");

		final ActionBar actionBar = (ActionBar) findViewById(R.id.actionbarHaut);
		actionBar.setHomeAction(new IntentAction(this, new Intent(this, DashboardActivity.class), R.drawable.home));
		actionBar.setTitre(PageTitle.NEW_PUBLICATION);

		textpubliez = (EditText) findViewById(R.id.textpubliez);
		publier = (Button) findViewById(R.id.submitPublication);
		publier.setOnClickListener(this);

	}

	public void onClick(View v) {
		if(v == publier){
			Intent intent = new Intent(this, WallActivity.class);
			intent.putExtra("userId", userId);
			startActivity(intent);


		}

	}


}
